#!/usr/bin/python
# -*- coding: utf-8 -*-


import sys
import codecs
f = open(sys.argv[1])
j = f.read().decode('utf8')
t = 0
print codecs.BOM_UTF8
def pt(c):
	for x in range(0, t):
		sys.stdout.write('  ')

for i in j:
  	if i == '{' or i == '{':
		sys.stdout.write('\n')
		t = t + 1
	  	pt(t)
		sys.stdout.write(i)
		sys.stdout.write('\n')
		t = t + 1
		pt(t)
	elif i == '[':
		sys.stdout.write(i)
#		sys.stdout.write('\n')
#		t = t + 1
#		pt(t)
	elif i == ']':
#		sys.stdout.write('\n')
#		t = t - 1
#		pt(t)
		sys.stdout.write(i)
	elif i == '}' or i == '}':
		sys.stdout.write('\n')
		t = t - 1
	  	pt(t)
		sys.stdout.write(i)
		t = t - 1
		#pt(t)
	elif i == ',':
		sys.stdout.write(i)
		sys.stdout.write('\n')
		pt(t)
	else:
		sys.stdout.write(i)

sys.stdout.write('\n')

# print j



